#include <stdio.h>
#include <ctype.h>
#include <limits.h>
#include <string.h>

#define PHRASE_MAX_LEN	252
#define PHRASE_MAX	1001
#define SANITY		3

int
is_okay(const char* line)
{
	short		letter[CHAR_MAX];
	int		letters = 0;
	int		diff_letters = 0;
	int		i = 0, j;
	short		bad_words_count = 0;
	short		words_count = 0;
	short		something = 0;

	memset(letter, 0, sizeof(letter));

	while (i < strlen(line)) {
		if (!ispunct(*(line + i)) && !isspace(*(line + i))) {
			++letter[(int) *(line + i)];
			++letters;
			something = 1;
		} else {
			for (j = 0 ; j < CHAR_MAX ; ++j)
				if (letter[j] > 0)
					++diff_letters;

			if (something) {
				++words_count;
				if (diff_letters <= SANITY || letters <= SANITY)
					++bad_words_count;
			}

			diff_letters = letters = something = 0;
			memset(letter, 0, sizeof(letter));
		}
		++i;
	}
	if (words_count - 2 * bad_words_count <= 0)
		return 0; /* bad phrase */
	else
		return 1; /* good one */
}


int
main()
{
	char line[PHRASE_MAX_LEN+2]; /* just in case */

	freopen("censored.in", "r", stdin);
	freopen("censored.out", "w", stdout);

	while (fgets(line, PHRASE_MAX_LEN, stdin))
		if (is_okay(line))
			printf("%s", line);
	return 0;
}
